<%@ include file="/include.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
  <base target="_self">
  <title>通用查询</title>
  <link rel="stylesheet" type="text/css" href="styles/default.css" >
  <script type="text/javascript" src="scripts/common.js"></script>
</head>

<body>
<form id="CommonSearchCode2Name" action="CommonSearchCode2Name.do" method="post">
<div class="main" style="width:85%;">
	<table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
		<caption align="top">
		  ${map.description}
		</caption>
	    <tr>
	      <td align="center">
	        <table border="0" style="width:70%">
	          <tr height="25">
	            <td align="right">代码</td>
	            <td><input type="text" name="code" value="${map.ccode.code}"></td>
	            <td align="right">名称</td>
	            <td><input type="text" name="name" value="<c:out value="${map.ccode.name}" escapeXml="true" />"></td>
	          </tr>
	          <tr class="button">
	            <td colspan="4">
	            	<input type="submit" value=" 查询 "/>&nbsp;
	              	<input type="button" value=" 清空 " onclick="clearInput();" />&nbsp;
	              	<input type="button" value=" 关闭 " onclick="window.opener=null;window.close();" />
	              	<input type="hidden" value="${map.type}" name="type" />
	            </td>
	          </tr>
	        </table>
	      </td>
	    </tr>
	  
	  <tr height="30">
	      <td align="center">
	      	<mytag:pagination pager="${map.page}" pageSize="10"  suppressHidden="true"/>
	      </td>
	  </tr>
	  <tbody>
	    <tr>
	      <td align="center">
	        <table class="list" style="width:90%;">
	          <tr class="title">
	            <td width="9%">序号</td>
	            <td width="22%">代码</td>
	            <td>名称</td>
	          </tr>
			<c:forEach items="${map.page.items}" varStatus="stat" var="code">
	          <tr onclick="commonCode2NameReturnValue('${code.code}','<c:out value="${code.name}" escapeXml="true" />');" style="cursor:pointer;">
	            <td>${stat.count+(map.page.currentPage-1)*map.page.pageSize}</td>
	            <td>${code.code}</td>
	            <td>${code.name}</td>
	          </tr>
			</c:forEach>
	        </table>
	      </td>
	    </tr>
	  </tbody>
	    <tr height="30">
	      <td align="center">
	      	<mytag:pagination pager="${map.page}" pageSize="10"  suppressHidden="false"/>
	      </td>
	    </tr>
	</table>
</div>
</form>
</body>
</html>
